Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add note about fs.rmdir()/fs.rmdirSync() #14323

Closed
wants to merge 1 commit into from

Conversation

al-k21
Copy link

@al-k21 al-k21 commented Jul 17, 2017

fs.rmdir()/fs.rmdirSync() on the file (not directory) results in different errors on
Windows to everything else

fixes: #8797

Checklist
Affected core subsystem(s)

doc

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Jul 17, 2017
doc/api/fs.md Outdated
@@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.

*Note*: Using `fs.rmdir()` on the file (not directory) results in an `ENOENT`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I am not sure, but maybe "on a file"?

doc/api/fs.md Outdated
@@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.

*Note*: Using `fs.rmdir()` on a file (not directory) results in an `ENOENT`
error on Windows and `ENOTDIR` error on Linux/macOS.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, also it is a good idea to generalize ENOTDIR for UNIX systems, not just Linux.

doc/api/fs.md Outdated
@@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.

*Note*: Using `fs.rmdir()` on a file (not directory) results in an `ENOENT`
error on Windows and `ENOTDIR` error on UNIX/macOS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I know you already changed it from Linux to UNIX, but I believe that throughout or docs, we use POSIX (and that includes macOS, or at least it does in our docs).

/cc @nodejs/documentation in case I'm wrong about some aspect of this. :-D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in Sync version as well, right?

@al-k21 al-k21 changed the title docs: add note about fs.rmdir() docs: add note about fs.rmdir()/fs.rmdirSync() Jul 17, 2017
Copy link
Member

@gdams gdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small nit and then LGTM

doc/api/fs.md Outdated
@@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.

*Note*: Using `fs.rmdir()` on a file (not directory) results in an `ENOENT`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit not directory => not a directory

doc/api/fs.md Outdated
@@ -2018,6 +2021,9 @@ changes:

Synchronous rmdir(2). Returns `undefined`.

*Note*: Using `fs.rmdirSync()` on a file (not directory) results in an `ENOENT`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit not directory => not a directory

doc/api/fs.md Outdated
@@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.

*Note*: Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT`
error on Windows and `ENOTDIR` error on POSIX.
Copy link
Member

@gibfahn gibfahn Jul 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENOTDIR error -> an ENOTDIR error (same below)

fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

fixes: nodejs#8797
Copy link
Member

@gdams gdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

jasnell pushed a commit that referenced this pull request Jul 19, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@jasnell
Copy link
Member

jasnell commented Jul 19, 2017

Landed in bd7735e

@jasnell jasnell closed this Jul 19, 2017
@gibfahn
Copy link
Member

gibfahn commented Jul 20, 2017

Congrats on becoming a Contributor @al-k21 !

@gdams
Copy link
Member

gdams commented Jul 22, 2017

Nice work @al-k21

addaleax pushed a commit that referenced this pull request Jul 22, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Jul 24, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@addaleax addaleax mentioned this pull request Jul 24, 2017
@addaleax addaleax mentioned this pull request Aug 2, 2017
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Aug 16, 2017
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Sep 3, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
MylesBorins pushed a commit that referenced this pull request Sep 5, 2017
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@al-k21 al-k21 deleted the docs branch October 18, 2017 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fs.rmdir() on file (not directory) has "ENOTDIR" on Linux/macOS vs "ENOENT" on Windows